package com.rapida.example.theme;

import android.widget.Toast;

import com.rapida.theme.RapidThemeActivity;

public class ExampleThemeActivity extends RapidThemeActivity {
	private MainUIController uiController;

	@Override
	protected boolean didFinishLaunchingWithOptions() {
		uiController = new MainUIController(this);
		setViewController(uiController);
		return true;
	}

	@Override
	public void OnThemeChanged(String newThemePackageName) {
		uiController.updateTheme(newThemePackageName);
		Toast.makeText(ExampleThemeActivity.this, getThemeResources().getString(R.string.app_name), Toast.LENGTH_SHORT).show();
	}

	public void applyThemeByItem(int i) {
		applyTheme(getThemes().get(i));
	}
}